# @Author   : 懒羊羊
# @File     : doYunSuan.py
# @Time     : 2024/11/28 18:14
import logging

from dologs import DoLog


class DoYunSuan:
    num1 = None
    num2 = None

    def jia(self, num1, num2):
        return num1 + num2

    def jian(self, num1, num2):
        return num1 - num2

    def cheng(self, num1, num2):
        return num1 * num2

    def chu(self, num1, num2):
        return num1 / num2


dalog = DoLog().set_get_logger(logging.INFO)

if __name__ == '__main__':

    try:
        dalog.info("开始捕获异常了！")
        sh = DoYunSuan()
        sh.jia(4, 5)
        sh.jian(16, 6)
        sh.cheng(6, 7)
        sh.chu(15, 0)
    except ZeroDivisionError as z:
        dalog.error(f"出错了!!!，{z}")
    else:
        print("无异常")
    finally:
        print("进行异常捕获了")
